Linux
tar 압축
- 선택압축:
# *.c* 과 *.h 파일을 src0503.tar로 압축 find . -name "*.c*" -o -name "*.h" | xargs tar rvf src0503.tar
crontab 환경변수 불러오기
crontab 할때 보통 계정의 환경변수를 불러올 수 있다. 트릭 중 하나는 bash -l
옵션을 사용하는 것이 있고, source ~/.bash_profile
을 사용하는 방법이 있다.
bash -l
은 full login 환경을 지원한다. 정확히는 .bashrc
파일을 로드 한다.
ssh
원격접속 애러
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
-생략-
Please contact your system administrator.
Add correct host key in /home/warren/.ssh/known_hosts to get rid of this message.
Offending key in /home/warren/.ssh/known_hosts:1
RSA host key for -생략(ip)- has changed and you have requested strict checking.
Host key verification failed.
원격지 IP의 호스트의 인증이 변경이 될 경우 발생하는 애러다. 예전 접속 정보와 변경이 되서 그렇다. 예를 들면 원격지의 OS를 새로 설치한다던가 하는 경우다. 아래와 같이 R
옵션으로 해결할 수 있다. R
옵션은 hostname에 해당하는 모든 key를 삭제하는 옵션이다.
ssh-keygen -R [hostname]
# 예: ssh-keygen -R 110.110.110.110